from django.contrib.auth import get_user_model
from rest_framework import generics
from rest_framework.permissions import IsAdminUser
from rest_framework import serializers
User= get_user_model()

class UserSerializer(serializers.Serializer):
    username = serializers.CharField(max_length=50)

class UserList(generics.ListAPIView):
    queryset = User.objects.all()
    serializer_class = UserSerializer


